

function getLocalStorageKeyString() {

    return 'me.haui.location-tracking.localStorage';

}


function addToLocalStorage(listEntry) {

    //console.log('addLocalStorage: ' + listEntry);

    if (listEntry !== null) {
        var localStoreEntries = getLocalStorageEntries();
        //localStorage.removeItem(getLocalStorageKeyString());
        if ( localStoreEntries !== null ){
            localStorage.setItem(getLocalStorageKeyString(), localStoreEntries + listEntry);
        }
        else{
            localStorage.setItem(getLocalStorageKeyString(), listEntry);
        }
    }

}


function getLocalStorageEntries() {

    try
    {
        return localStorage.getItem(getLocalStorageKeyString());
    }
    catch (err)
    {
        return "";
    }


}